﻿using System;
using System.Collections.Generic;
using System.Text;
using VoteServices.VoteModel;

namespace VoteServices
{
    public class ProblemService
    {
        VoteData data = new VoteData();
        public void CheckTime()
        {
            foreach(Problem question in data.problems)
            {
                TimeSpan ts = DateTime.Now - question.CreationTime;
                if (ts.Hours < 24)
                    Console.WriteLine("问题：{0} 没有过期！", question.Content);
                else
                    Console.WriteLine("问题：{0} 过期辣！", question.Content);
            }
        }

    }
}

